#include <graphics/MeshManager.h>

namespace ne
{
    template<> MeshManager* Singleton<MeshManager>::mpInstance = 0;

    MeshManager::MeshManager()
    {
        mResourceType = "Mesh";
        std::cout << "Construct Mesh Manager\n";
    }

    MeshManager::~MeshManager()
    {
        std::cout << "Disconstruct Mesh Manager\n";
    }

    MeshManager& MeshManager::GetSingleton()
    {
        assert(mpInstance);
        return *mpInstance;
    }

    MeshManager* MeshManager::GetSingletonPtr()
    {
        return mpInstance;
    }

    Resource* MeshManager::createImplement(const uint64_t id,
                                           const std::string &name,
                                           const std::string &fileName,
                                           const bool isManual,
                                           ManualResourceLoader *pLoader)
    {
        return new Mesh(this, id, name, fileName, isManual, pLoader);
    }
}
